<html>
<head><meta charset="utf-8"><title>meeting 2021-04-27 · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html">meeting 2021-04-27</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236305641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236305641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236305641">(Apr 27 2021 at 09:14)</a>:</h4>
<p>Hi folks, I'm hoping to attend this <a href="https://github.com/WebAssembly/meetings/blob/master/main/2021/CG-04-27.md">webassembly CG meeting</a> which takes place during our normally scheduled meeting time. I'm not sure how present I will be this week as a result -- I do want to talk about the vision doc stuff we had discussed last time though.</p>



<a name="236349775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236349775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236349775">(Apr 27 2021 at 14:46)</a>:</h4>
<p>meeting <span class="user-group-mention" data-user-group-id="3805">@project-const-generics</span> <span aria-label="sparkles" class="emoji emoji-2728" role="img" title="sparkles">:sparkles:</span></p>



<a name="236349964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236349964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236349964">(Apr 27 2021 at 14:47)</a>:</h4>
<p>continuing the last meeting, we're going to talk a bit about the future of const generics</p>



<a name="236349996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236349996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236349996">(Apr 27 2021 at 14:47)</a>:</h4>
<p>wave</p>



<a name="236350092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350092">(Apr 27 2021 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> do you have some thoughts on how to best approach this topic?</p>



<a name="236350142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350142">(Apr 27 2021 at 14:48)</a>:</h4>
<p>otherwise i would just look at the async/await docs and copy these :p</p>



<a name="236350637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350637">(Apr 27 2021 at 14:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236350142">said</a>:</p>
<blockquote>
<p>otherwise i would just look at the async/await docs and copy these :p</p>
</blockquote>
<p>do you have a link to those docs?</p>



<a name="236350664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350664">(Apr 27 2021 at 14:51)</a>:</h4>
<p><a href="https://rust-lang.github.io/wg-async-foundations/vision/how_to_vision/shiny_future.html">https://rust-lang.github.io/wg-async-foundations/vision/how_to_vision/shiny_future.html</a></p>



<a name="236350676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350676">(Apr 27 2021 at 14:51)</a>:</h4>
<p>thanks :)</p>



<a name="236350753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350753">(Apr 27 2021 at 14:52)</a>:</h4>
<p>sorry</p>



<a name="236350762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350762">(Apr 27 2021 at 14:52)</a>:</h4>
<p>yeah</p>



<a name="236350772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350772">(Apr 27 2021 at 14:52)</a>:</h4>
<p>so</p>



<a name="236350820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350820">(Apr 27 2021 at 14:52)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> there's a repo for const-generics project, right?</p>



<a name="236350846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350846">(Apr 27 2021 at 14:52)</a>:</h4>
<p><a href="https://github.com/rust-lang/project-const-generics">https://github.com/rust-lang/project-const-generics</a></p>



<a name="236350876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350876">(Apr 27 2021 at 14:52)</a>:</h4>
<p>I think probably the best thing to do at the moment is to start sketching out a few .. examples and kind of cover some of the key esign points</p>



<a name="236350887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350887">(Apr 27 2021 at 14:52)</a>:</h4>
<p>let's make a hackmd?</p>



<a name="236350958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350958">(Apr 27 2021 at 14:53)</a>:</h4>
<p><a href="https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ">https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ</a></p>



<a name="236350992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236350992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236350992">(Apr 27 2021 at 14:53)</a>:</h4>
<p>I'd say a related point is variadic generics, including <code>const</code> ones. :)</p>



<a name="236351108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351108">(Apr 27 2021 at 14:54)</a>:</h4>
<p>great!</p>



<a name="236351176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351176">(Apr 27 2021 at 14:54)</a>:</h4>
<p>i'm going to drop in some notes</p>



<a name="236351364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351364">(Apr 27 2021 at 14:55)</a>:</h4>
<p>to do this <em>properly</em></p>



<a name="236351379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351379">(Apr 27 2021 at 14:55)</a>:</h4>
<p>we should start with <em>status quo</em></p>



<a name="236351437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351437">(Apr 27 2021 at 14:56)</a>:</h4>
<p>I don't think we have to go all out but i would appreciate it if we did outline some of the problems we are aiming to solve</p>



<a name="236351528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351528">(Apr 27 2021 at 14:56)</a>:</h4>
<p>So this is more a vision for "const" in Rust, rather than specifically const generics?</p>



<a name="236351573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351573">(Apr 27 2021 at 14:57)</a>:</h4>
<p>I may be blending things but I don't think so</p>



<a name="236351600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351600">(Apr 27 2021 at 14:57)</a>:</h4>
<p>to me they seem pretty intimately connected</p>



<a name="236351656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351656">(Apr 27 2021 at 14:57)</a>:</h4>
<p>once we have "any type for const params" we'll probably quickly run into wanting const fn traits i imagine so seems related <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="236351675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351675">(Apr 27 2021 at 14:57)</a>:</h4>
<p>is there something I wrote that seems like it's <em>not</em> const generics?</p>



<a name="236351705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351705">(Apr 27 2021 at 14:57)</a>:</h4>
<p>k, I see</p>



<a name="236351785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351785">(Apr 27 2021 at 14:58)</a>:</h4>
<p>I'm ok to remove those things as 'maybes' :)</p>



<a name="236351807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351807">(Apr 27 2021 at 14:58)</a>:</h4>
<p>although i think that it's all one feature</p>



<a name="236351838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351838">(Apr 27 2021 at 14:58)</a>:</h4>
<p>in users' minds</p>



<a name="236351922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236351922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236351922">(Apr 27 2021 at 14:58)</a>:</h4>
<p>I think it would help to have a detailed story that incorporates all of these related features, I agree.</p>



<a name="236352140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236352140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236352140">(Apr 27 2021 at 15:00)</a>:</h4>
<p>Though perhaps there are some people interested in some aspects of this without being so involved with const generics specifically (e.g. some of the members of <a class="stream" data-stream-id="146212" href="/#narrow/stream/146212-t-compiler.2Fconst-eval">#t-compiler/const-eval</a>).</p>



<a name="236352401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236352401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236352401">(Apr 27 2021 at 15:00)</a>:</h4>
<p>I think this will be iterated for a little while :)</p>



<a name="236352506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236352506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236352506">(Apr 27 2021 at 15:00)</a>:</h4>
<p>that is, I think we can  poke at it now and then float over in other streams</p>



<a name="236352869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236352869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236352869">(Apr 27 2021 at 15:01)</a>:</h4>
<p>what's</p>
<blockquote>
<p>Make a compile-time expression template library.</p>
</blockquote>



<a name="236353182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236353182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236353182">(Apr 27 2021 at 15:02)</a>:</h4>
<p>Something that can express an expression as a tree at compile-time.</p>



<a name="236353303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236353303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236353303">(Apr 27 2021 at 15:03)</a>:</h4>
<p>oo neat, kinda reminds me of our <code>AbstractConst</code> lol...</p>



<a name="236353577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236353577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236353577">(Apr 27 2021 at 15:03)</a>:</h4>
<blockquote>
<ul>
<li>Writing a generic abstraction modifying arrays is still not possible if the abstraction needs to change array lengths.</li>
</ul>
</blockquote>



<a name="236353605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236353605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236353605">(Apr 27 2021 at 15:03)</a>:</h4>
<p>can someone say a bit more about this?</p>



<a name="236354353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354353">(Apr 27 2021 at 15:06)</a>:</h4>
<p>OK, it seems like we sort of hit a "fixed-ish" point in terms of major bullets?</p>



<a name="236354521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354521">(Apr 27 2021 at 15:07)</a>:</h4>
<p>I have a question</p>



<a name="236354561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354561">(Apr 27 2021 at 15:07)</a>:</h4>
<p>at some point <span class="user-mention" data-user-id="120791">@RalfJ</span> was talking about "unsafe in const" being used for "things that might not be const'</p>



<a name="236354603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354603">(Apr 27 2021 at 15:07)</a>:</h4>
<p>(but which would not necessarily be unsafe in an ordinary function)</p>



<a name="236354670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354670">(Apr 27 2021 at 15:07)</a>:</h4>
<p>to what extent is that the "status qou" today or is there a different understanding</p>



<a name="236354841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236354841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236354841">(Apr 27 2021 at 15:08)</a>:</h4>
<p><a href="https://www.ralfj.de/blog/2018/07/19/const.html">https://www.ralfj.de/blog/2018/07/19/const.html</a></p>



<a name="236355928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236355928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236355928">(Apr 27 2021 at 15:12)</a>:</h4>
<p>ok :)</p>



<a name="236355937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236355937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236355937">(Apr 27 2021 at 15:12)</a>:</h4>
<p>sounds like that should be part of the story then</p>



<a name="236356047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356047">(Apr 27 2021 at 15:13)</a>:</h4>
<p>I'm thinking about the motivating examples</p>



<a name="236356094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356094">(Apr 27 2021 at 15:13)</a>:</h4>
<p>something I've heard is the use of const generics to speed up crypto routines</p>



<a name="236356104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356104">(Apr 27 2021 at 15:13)</a>:</h4>
<p>I don't really know how or why</p>



<a name="236356158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356158">(Apr 27 2021 at 15:13)</a>:</h4>
<p>but it'd be nice to talk about things that "everyday programmers" might want to do too</p>



<a name="236356171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356171">(Apr 27 2021 at 15:13)</a>:</h4>
<p>the most obvious i guess is writing impls for all arrays</p>



<a name="236356454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356454">(Apr 27 2021 at 15:14)</a>:</h4>
<p>I am debating how much it's worth writing about the frustrations people face today</p>



<a name="236356582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356582">(Apr 27 2021 at 15:15)</a>:</h4>
<p>I think it's important for motivating and prioritizing, but maybe less so in this case for sketching the plan</p>



<a name="236356620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356620">(Apr 27 2021 at 15:15)</a>:</h4>
<p>maybe we can come to it later</p>



<a name="236356655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356655">(Apr 27 2021 at 15:15)</a>:</h4>
<p>is it worth mentioning somewhere about specialising on const params?</p>



<a name="236356707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356707">(Apr 27 2021 at 15:16)</a>:</h4>
<p>that might be way out of scope for this <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="236356708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356708">(Apr 27 2021 at 15:16)</a>:</h4>
<p>I guess one question I have is how much we are transcribing plans where consenss exists</p>



<a name="236356742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356742">(Apr 27 2021 at 15:16)</a>:</h4>
<p>I think it's worth adding to the list of things to consider</p>



<a name="236356908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356908">(Apr 27 2021 at 15:17)</a>:</h4>
<p>Would parallels that exist in the C++ world but aren't possible with Rust today be okay to mention?</p>



<a name="236356975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356975">(Apr 27 2021 at 15:18)</a>:</h4>
<p>yes</p>



<a name="236356986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236356986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236356986">(Apr 27 2021 at 15:18)</a>:</h4>
<p>I think that's a great idea of the status quo</p>



<a name="236357011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357011">(Apr 27 2021 at 15:18)</a>:</h4>
<p>i.e., Grace (C++ developer) wants to do X that she' used to doing...</p>



<a name="236357118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357118">(Apr 27 2021 at 15:19)</a>:</h4>
<p>ok, I was thinking about it, and I do think it's important to write the status quo eventually, but I think we can iterate a bit back and forth</p>



<a name="236357132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357132">(Apr 27 2021 at 15:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236356708">said</a>:</p>
<blockquote>
<p>I guess one question I have is how much we are transcribing plans where consenss exists</p>
</blockquote>
<p>the reason I was asking about this is</p>



<a name="236357151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357151">(Apr 27 2021 at 15:19)</a>:</h4>
<p>in the async vision doc, one thing I'm excited about is writing mutually contradictory stories :)</p>



<a name="236357158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357158">(Apr 27 2021 at 15:19)</a>:</h4>
<p>to show the various options under consideration</p>



<a name="236357167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357167">(Apr 27 2021 at 15:19)</a>:</h4>
<p>and help us judge what is better</p>



<a name="236357171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357171">(Apr 27 2021 at 15:19)</a>:</h4>
<p>I suspect we'll want to do the same here</p>



<a name="236357282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357282">(Apr 27 2021 at 15:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="256313">Hameer Abbasi</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236356908">said</a>:</p>
<blockquote>
<p>Would parallels that exist in the C++ world but aren't possible with Rust today be okay to mention?</p>
</blockquote>
<p>are you noting those somewhere?</p>



<a name="236357421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357421">(Apr 27 2021 at 15:21)</a>:</h4>
<blockquote>
<ul>
<li>Make a compile-time expression template library.</li>
</ul>
</blockquote>
<p>wat's this again?</p>



<a name="236357475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357475">(Apr 27 2021 at 15:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="256313">Hameer Abbasi</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236353182">said</a>:</p>
<blockquote>
<p>Something that can express an expression as a tree at compile-time.</p>
</blockquote>



<a name="236357578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357578">(Apr 27 2021 at 15:22)</a>:</h4>
<p>so something like proc-macros? <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="236357596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357596">(Apr 27 2021 at 15:22)</a>:</h4>
<p>ok, I'm wondering about whether to go through the motivating examples a bit and try to elaborate into story sketches</p>



<a name="236357603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357603">(Apr 27 2021 at 15:22)</a>:</h4>
<blockquote>
<ul>
<li>Writing an impl for all array types <code>[T; N]</code> for any <code>N</code></li>
</ul>
</blockquote>



<a name="236357618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357618">(Apr 27 2021 at 15:22)</a>:</h4>
<p>this one is realtively straightforward</p>



<a name="236357788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357788">(Apr 27 2021 at 15:23)</a>:</h4>
<p>there are a lot of cases where we want to special case <code>0</code> which isn't easily possible <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="236357813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357813">(Apr 27 2021 at 15:24)</a>:</h4>
<p>like what?</p>



<a name="236357862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357862">(Apr 27 2021 at 15:24)</a>:</h4>
<p>also, is <code>Default</code> a good trait to write a story about?</p>



<a name="236357877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357877">(Apr 27 2021 at 15:24)</a>:</h4>
<p>I'm imagining the following structure for the hackmd;</p>



<a name="236357891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357891">(Apr 27 2021 at 15:24)</a>:</h4>
<ul>
<li>motivations examples</li>
</ul>



<a name="236357908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357908">(Apr 27 2021 at 15:24)</a>:</h4>
<p>lt's add in ideas of things we want to do with const generics there</p>



<a name="236357910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357910">(Apr 27 2021 at 15:24)</a>:</h4>
<p>then</p>



<a name="236357918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357918">(Apr 27 2021 at 15:24)</a>:</h4>
<ul>
<li>status quo stories</li>
</ul>



<a name="236357931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357931">(Apr 27 2021 at 15:24)</a>:</h4>
<p>sketch outlines based on those-- what happens today?</p>



<a name="236357940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357940">(Apr 27 2021 at 15:24)</a>:</h4>
<ul>
<li>shiny future stories</li>
</ul>



<a name="236357967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357967">(Apr 27 2021 at 15:24)</a>:</h4>
<ul>
<li>sketch outlines based on motivating examples-- how could it play out instead? non-exclusive</li>
</ul>



<a name="236357977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236357977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236357977">(Apr 27 2021 at 15:24)</a>:</h4>
<p>(i.e., maybe we have a couple of ideas)</p>



<a name="236358079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236358079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236358079">(Apr 27 2021 at 15:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236357813">said</a>:</p>
<blockquote>
<p>like what?</p>
</blockquote>
<p><code>impl&lt;T&gt; Trait for [T; 0] {}</code> and <code>impl&lt;T: Trait&gt; Trait for [T; 1] {}</code> often already exists so we can't use one generic impl for this without making a breaking change</p>



<a name="236358145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236358145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236358145">(Apr 27 2021 at 15:25)</a>:</h4>
<p>because there is no generalization that works?</p>



<a name="236358247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236358247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236358247">(Apr 27 2021 at 15:26)</a>:</h4>
<p>not on stable ^^</p>



<a name="236358298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236358298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236358298">(Apr 27 2021 at 15:26)</a>:</h4>
<p>ok</p>



<a name="236358391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236358391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236358391">(Apr 27 2021 at 15:27)</a>:</h4>
<p>I see <code>Default</code> is implemented for <code>T; N</code> where <code>N&lt;=32</code></p>



<a name="236359158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359158">(Apr 27 2021 at 15:30)</a>:</h4>
<p>I guess that's rougly what happens with <code>Default</code> today?</p>



<a name="236359366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359366">(Apr 27 2021 at 15:30)</a>:</h4>
<p>the syntax is <code>[T::default(); N]</code> not <code>[T::default(), ..N]</code> right?</p>



<a name="236359384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359384">(Apr 27 2021 at 15:31)</a>:</h4>
<p>oh, yes</p>



<a name="236359390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359390">(Apr 27 2021 at 15:31)</a>:</h4>
<p>lol</p>



<a name="236359396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359396">(Apr 27 2021 at 15:31)</a>:</h4>
<p>the <code>..</code> syntax is super old</p>



<a name="236359506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359506">(Apr 27 2021 at 15:31)</a>:</h4>
<p>I feel like there's another story, <span class="user-mention" data-user-id="216206">@lcnr</span>, covering the <code>; 0</code> case</p>



<a name="236359637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359637">(Apr 27 2021 at 15:32)</a>:</h4>
<p>so <code>[T::default(); N]</code> probably doesnt work because <code>T::default()</code> isnt const or clone/copy(?) but also even if it did this wouldnt be enough because of the <code>[T; 0]: Default</code> impl we want even when T isnt default</p>



<a name="236359724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359724">(Apr 27 2021 at 15:33)</a>:</h4>
<p>i guess this is two things <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="236359753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359753">(Apr 27 2021 at 15:33)</a>:</h4>
<p>ah, no, that's good</p>



<a name="236359805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359805">(Apr 27 2021 at 15:33)</a>:</h4>
<p>well, ignoring that, is there any way to make <code>[T::default(); N]</code> work?</p>



<a name="236359840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359840">(Apr 27 2021 at 15:33)</a>:</h4>
<p>I was somebody writing <code>[(); N].map(|()|...)</code>, but... we can't collect, presumably?</p>



<a name="236359860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359860">(Apr 27 2021 at 15:33)</a>:</h4>
<p>that might be a super nifty shiny future story though :)</p>



<a name="236359886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359886">(Apr 27 2021 at 15:34)</a>:</h4>
<p>we can do that, <code>map</code> is also a separate function for arrays</p>



<a name="236359909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359909">(Apr 27 2021 at 15:34)</a>:</h4>
<p>^^</p>



<a name="236359939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359939">(Apr 27 2021 at 15:34)</a>:</h4>
<p>There's a pr for <code>generate&lt;N&gt;(fn) -&gt; [fn(i); N]</code> edit:  in progress but has been up for a long time<br>
<a href="https://github.com/rust-lang/rust/pull/75644/">https://github.com/rust-lang/rust/pull/75644/</a></p>



<a name="236359945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236359945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236359945">(Apr 27 2021 at 15:34)</a>:</h4>
<p>oic</p>



<a name="236360064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360064">(Apr 27 2021 at 15:34)</a>:</h4>
<p><code>(0..N).map(|()| T::default()).collect::&lt;[T; N]&gt;()</code> would be nice</p>



<a name="236360096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360096">(Apr 27 2021 at 15:35)</a>:</h4>
<p>although still somewhat tedius to write compared to what you'd intuitively expect to work</p>



<a name="236360107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360107">(Apr 27 2021 at 15:35)</a>:</h4>
<p>(also this collect impl doesnt exist lol)</p>



<a name="236360279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360279">(Apr 27 2021 at 15:36)</a>:</h4>
<p>somewhat tangental, one thing that I've occasionally wanted has been const ranges, which could be used as Boxy just used them, or to index to a reference to an array in a slice</p>



<a name="236360923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360923">(Apr 27 2021 at 15:40)</a>:</h4>
<p>ok, these two stories are good</p>



<a name="236360940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236360940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236360940">(Apr 27 2021 at 15:40)</a>:</h4>
<p>I guess they give rise to some obvious shiny future stories?</p>



<a name="236361031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361031">(Apr 27 2021 at 15:40)</a>:</h4>
<p>well tbqh I'm not sure about the shiny future for the <code>Default</code> impl</p>



<a name="236361117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361117">(Apr 27 2021 at 15:41)</a>:</h4>
<p>i had an idea using marker traits and specialization :p <span class="user-mention silent" data-user-id="256759">boats</span> wasn't too happy with landing that on stable though</p>



<a name="236361125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361125">(Apr 27 2021 at 15:41)</a>:</h4>
<p>so</p>



<a name="236361136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361136">(Apr 27 2021 at 15:41)</a>:</h4>
<p>ok there's too things</p>



<a name="236361147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361147">(Apr 27 2021 at 15:41)</a>:</h4>
<p>one is how to write the body</p>



<a name="236361153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361153">(Apr 27 2021 at 15:41)</a>:</h4>
<p>and the other is the specialization?</p>



<a name="236361184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361184">(Apr 27 2021 at 15:41)</a>:</h4>
<p>either specialization or exhaustiveness checks with "const evaluatable bounds"</p>



<a name="236361185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361185">(Apr 27 2021 at 15:41)</a>:</h4>
<p>y</p>



<a name="236361241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361241">(Apr 27 2021 at 15:42)</a>:</h4>
<p>it would be nice if <code>[{expr}; N]</code> just worked <span aria-label="tm" class="emoji emoji-2122" role="img" title="tm">:tm:</span> the same way that you can write it using macros</p>



<a name="236361248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361248">(Apr 27 2021 at 15:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236361147">said</a>:</p>
<blockquote>
<p>one is how to write the body</p>
</blockquote>
<p>the <code>map</code> function works today, <span class="user-mention" data-user-id="216206">@lcnr</span> ?</p>



<a name="236361266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361266">(Apr 27 2021 at 15:42)</a>:</h4>
<p>yes</p>



<a name="236361276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361276">(Apr 27 2021 at 15:42)</a>:</h4>
<p>that said</p>



<a name="236361293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361293">(Apr 27 2021 at 15:42)</a>:</h4>
<p>ah, never mind</p>



<a name="236361311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361311">(Apr 27 2021 at 15:42)</a>:</h4>
<p><code>map</code> is still unstable, but it does work without relying on unstable features</p>



<a name="236361323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361323">(Apr 27 2021 at 15:42)</a>:</h4>
<p>ok, let's run with that</p>



<a name="236361332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361332">(Apr 27 2021 at 15:42)</a>:</h4>
<p>we should add it to the status quo story too though</p>



<a name="236361350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361350">(Apr 27 2021 at 15:42)</a>:</h4>
<p>that she discovers it by asking <span class="user-mention" data-user-id="216206">@lcnr</span> on Zulip ;p</p>



<a name="236361377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361377">(Apr 27 2021 at 15:42)</a>:</h4>
<p><span aria-label="sparkles" class="emoji emoji-2728" role="img" title="sparkles">:sparkles:</span> that's what i am here for</p>



<a name="236361450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361450">(Apr 27 2021 at 15:43)</a>:</h4>
<p>Specialization is just the equivalent of <code>_</code> in the match expression. I don't see why it'd be undesirable. That said, exhaustiveness checks are just as good.</p>



<a name="236361486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361486">(Apr 27 2021 at 15:43)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="nb">Default</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">T</span><span class="p">;</span><span class="w"> </span><span class="n">N</span><span class="p">]</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nb">Default</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">default</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="p">[();</span><span class="w"> </span><span class="n">N</span><span class="p">].</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="p">()</span><span class="o">|</span><span class="w"> </span><span class="n">T</span>::<span class="n">default</span><span class="p">())</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="236361487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361487">(Apr 27 2021 at 15:43)</a>:</h4>
<p>?</p>



<a name="236361497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361497">(Apr 27 2021 at 15:43)</a>:</h4>
<p>y</p>



<a name="236361526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361526">(Apr 27 2021 at 15:43)</a>:</h4>
<p>(for every trait except <code>Default</code> in std)</p>



<a name="236361600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236361600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236361600">(Apr 27 2021 at 15:44)</a>:</h4>
<p>because of the <code>[NotDefault; 0]: Default</code> impl</p>



<a name="236362029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362029">(Apr 27 2021 at 15:47)</a>:</h4>
<p>ok, I think the story is complete now</p>



<a name="236362047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362047">(Apr 27 2021 at 15:47)</a>:</h4>
<p>I merged it in with the other story someone had written</p>



<a name="236362061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362061">(Apr 27 2021 at 15:47)</a>:</h4>
<blockquote>
<p>Frustrated, Barbara gives up.</p>
</blockquote>
<p>barbara is so relatable</p>



<a name="236362234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362234">(Apr 27 2021 at 15:48)</a>:</h4>
<p>"and goes and contributes to rust-analyzer instead" <span aria-label="sob" class="emoji emoji-1f62d" role="img" title="sob">:sob:</span> lol</p>



<a name="236362244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362244">(Apr 27 2021 at 15:48)</a>:</h4>
<p>this story isn't <em>that</em> far from the shiny future I guess</p>



<a name="236362268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362268">(Apr 27 2021 at 15:48)</a>:</h4>
<p>hehe nobody was supposed to see that stray edit ;)</p>



<a name="236362327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362327">(Apr 27 2021 at 15:49)</a>:</h4>
<p>I'm not sure what I think about <code>[(); N].map(...)</code> as an idiom though</p>



<a name="236362411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362411">(Apr 27 2021 at 15:49)</a>:</h4>
<p>is it backwards incompatible to have <code>[non-const-expr; 3]</code> work like our macro impls?: <code>[non-const-expr, non-const-expr, non-const-expr]</code>?</p>



<a name="236362490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362490">(Apr 27 2021 at 15:50)</a>:</h4>
<p>I think so</p>



<a name="236362500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362500">(Apr 27 2021 at 15:50)</a>:</h4>
<p>if there are side-effects</p>



<a name="236362508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362508">(Apr 27 2021 at 15:50)</a>:</h4>
<p>I suppose it would be a bit odd if the expr is side effectful yeah</p>



<a name="236362519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362519">(Apr 27 2021 at 15:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236362327">said</a>:</p>
<blockquote>
<p>I'm not sure what I think about <code>[(); N].map(...)</code> as an idiom though</p>
</blockquote>
<p>it's a bit ugly, but creating arrays from iterators is a can of worms, because it isn't obvious what's the best way to deal with iterators which don't return enough elements</p>



<a name="236362570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362570">(Apr 27 2021 at 15:50)</a>:</h4>
<p>I think we would want <em>some</em> syntax</p>



<a name="236362575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362575">(Apr 27 2021 at 15:50)</a>:</h4>
<p>I don't know what it is</p>



<a name="236362651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362651">(Apr 27 2021 at 15:50)</a>:</h4>
<p><code>$({expr})N</code>lol</p>



<a name="236362798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362798">(Apr 27 2021 at 15:51)</a>:</h4>
<p>The <code>from_fn/generate</code> I mentioned earlier should replace <code>[(); N].map(...)</code>, if it's merged in <a href="https://github.com/rust-lang/rust/pull/75644/">https://github.com/rust-lang/rust/pull/75644/</a></p>



<a name="236362800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362800">(Apr 27 2021 at 15:51)</a>:</h4>
<p>let's sktch some syntax for now</p>



<a name="236362872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362872">(Apr 27 2021 at 15:52)</a>:</h4>
<p>oh yeah I missed that</p>



<a name="236362898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362898">(Apr 27 2021 at 15:52)</a>:</h4>
<p>that's plausible</p>



<a name="236362922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236362922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236362922">(Apr 27 2021 at 15:52)</a>:</h4>
<p>is there a <code>from_fn</code> trait?</p>



<a name="236363005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236363005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236363005">(Apr 27 2021 at 15:53)</a>:</h4>
<p>ah no this is just for building arrays in specific from a given function</p>



<a name="236363779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236363779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236363779">(Apr 27 2021 at 15:58)</a>:</h4>
<p>I'm just thinking it might be a nice trait</p>



<a name="236363791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236363791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236363791">(Apr 27 2021 at 15:58)</a>:</h4>
<p><code>T::from_fn(|i| ...)</code></p>



<a name="236363822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236363822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236363822">(Apr 27 2021 at 15:58)</a>:</h4>
<p>I'd be hapier with something that's not special case to arrays</p>



<a name="236363856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236363856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236363856">(Apr 27 2021 at 15:58)</a>:</h4>
<p>but I don't know that it has to be special syntax</p>



<a name="236956713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236956713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236956713">(May 01 2021 at 10:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/260443-project-const-generics/topic/meeting.202021-04-27/near/236354670">said</a>:</p>
<blockquote>
<p>to what extent is that the "status qou" today or is there a different understanding</p>
</blockquote>
<p>there is currently one unsafety check that is only active in <code>const</code>/<code>const fn</code>, and it is for casting raw ptrs to ints.<br>
another possible candidate might be raw ptr equality tests, but we currently just forbid those entirely in const and (unstably) provide methods to test <code>guaranteed_eq</code> and <code>guaranteed_ne</code> -- equality of ptrs at const-time is a ternary relation with possible values "definitely equal", "definitely inequal", and "<span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span>"</p>



<a name="236964582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/236964582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#236964582">(May 01 2021 at 12:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> If you’re looking for more real world examples, we just recently merged in a <a href="https://github.com/EmbarkStudios/rust-gpu/blob/1431c18b9db70feafc64e5096a64e5fefffbed18/crates/spirv-std/src/image.rs#L31">const generic <code>Image</code> type</a> in <code>rust-gpu</code>.</p>
<p>In SPIR-V all types are parametrised, and there’s an <code>OpTypeImage</code> which has 7 different parameters ,each of which having at least 2 or 3 variants (and one having 39!). This type would have a tremendous amount of boilerplate if we had to use type generics for the parameters, but with const generics it became really easy to implement and represent. On top of which we could write traits that are parameterised on top of the type’s const parameters. This allows us to do incredibly powerful generic type checking where we can parameterise what type you can use for coordinates based on the <code>Image</code>’s parameters (E.g. vec2 for 2D image, vec3 for 3D, etc).</p>



<a name="237079733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/237079733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Marks <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#237079733">(May 02 2021 at 20:24)</a>:</h4>
<p>Another real  example that's interesting: <a href="https://numpy.org/doc/stable/user/basics.broadcasting.html">broadcasting</a>. This lets you do binary math operations on arrays that don't have identical 'shape', subject to certain 'broadcasting rules' This is very useful/common in numpy-style array programming. This might be implicit in <span class="user-mention" data-user-id="216206">@lcnr</span> 's <code>xtensor</code> example.  I'd include <a href="https://github.com/google/jax">jax</a> as another compelling example.</p>
<p>Seems like it should be possible to implement numpy's broadcasting rules in using <code>const_evaluatable_checked</code>, but I think I'm hitting a bug?<br>
Sketch of how this might look &amp; current issue I'm hitting: <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=c346968fc48081893095422ca538dcc7">playground</a></p>



<a name="237080012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/237080012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#237080012">(May 02 2021 at 20:28)</a>:</h4>
<p>..adding a <code>[(); N - 2]:</code> bound causes a "evaluation of constant value failed" error so that's not a great sign <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="237081279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/237081279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#237081279">(May 02 2021 at 20:45)</a>:</h4>
<p><span class="user-mention" data-user-id="263011">@Patrick Marks</span> The one thing about const-generics is that it's currently hard to abstract over tensor dimensions, as you'd essentially need to have a tensor class with an array as a const parameter: <code>struct Tensor&lt;const N_DIMS: usize, const DIMS; [usize; N_DIMS]&gt;</code>, I don't know if that kind of thing is supported currently, but it'd be exciting if it were. This was my main use case for looking at const-generics in the first place, so hopefully linear algebra in rust will be able to take off as const-generics gets more and more features</p>



<a name="237098600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/237098600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Marks <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#237098600">(May 03 2021 at 00:45)</a>:</h4>
<p><span class="user-mention" data-user-id="326189">@jknodt</span> agreed, that would the ideal, but of course just implementing <code>Arr1&lt;N&gt;</code> ... <code>ArrK&lt;N1, ..., Nk&gt;</code> up to some reasonable K would cover many applications.</p>



<a name="237098669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/meeting%202021-04-27/near/237098669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/meeting.202021-04-27.html#237098669">(May 03 2021 at 00:46)</a>:</h4>
<p>the issue there is just ergonomics, with Numpy you have 1 type, having multiple types that need to interoperate is a pain on the end user</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>